﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GaiNo.Core.Data;

namespace GaiNo.WS.Core.Data
{
    public class AccessSqlPager : SqlPager
    {
        public override string GetSqlSentence()
        {
            string result = "SELECT " + StrGetFields + " FROM (SELECT TOP " + PageSize + " * FROM (SELECT TOP " + (PageIndex + 1) * PageSize + " * FROM " + TableName + StrWhere + " ORDER BY " + OrderField + " " + OrderType + ") TA ORDER BY " + OrderField + " " + OrderType + " ) TB ORDER BY " + OrderField + " " + OrderType;
            return result;
        }
    }
}
